\" t
.TH MUNIPACK  1 "October 2011" "Munipack project" "User Commands" 
.SH NAME
munipack \- a command line interface for Munipack
.SH SYNOPSIS
.B munipack 
.I [global options] action [action options] [file(s)]
.SH DESCRIPTION
Munipack is a general astronomical image processing software.
This utility provides a command line interface for Munipack.
.SH ELEMENTAL ACTIONS
.TP
.B mdark
.I [\-o file] [\-b bitpix] [\-r] file(s)
.PP
Create a mean dark frame. The output dark is stored as mdark.fits or
in file specified by -o option. The output has -b bitpix numerical
precision. The mean is computed as the robust mean by specifying of -r
option or as the arithmetical mean otherwise.
.TP
.B mflat
.I [\-o file] [\-b bitpix] [\-n norm] [\-step n] file(s)
.PP
Create a mean flat frame. The output flat is stored as mflat.fits or
in file specified by -o option. The output has -b bitpix numerical
precision (defaultly to -32). The norm sets output level (defaultly to 1.0) 
and -step a leap over the image in given steps. It is reccomended set
the norm as half of range for the integer bitpix: -b 16 -n 30000.
.TP
.B dark
.I [\-x flag] [\-b bitpix] darkfile file(s)[,result(s)]
.PP
Subtract darks from files. Pass darkflat as a first non-optional parameter.
All files following the darkname will be subtracted for the dark. Frames 
will be saved to a file named as 'result'. If the result name is not 
specified, the output name will created by adding of '_D' to the base filename 
(x.fits to x_D.fits). Use dash '\-' to read filenames from standard input 
(the result is specified by the same way). 
Optional flags: '!' will overwrite existing files (BE VERY CAREFULL!) 
and '.' will create output files in a current directory (/tmp/x.fits to x.fits).
.TP
.B flat
.I [\-x flag] [\-b bitpix] flatfile file(s)[,result(s)]
.PP
Divide files by  flat-field. Pass flatfile as a first non-optional 
parameter. All files following the flatfile will corrected by the flat. 
Flat corrected frames will saved to a file named as 'result'.
If the result name is not specified, the output name
will created by adding of '_F' to the base filename (x.fits to x_F.fits).
Use dash '\-' to read filenames from standard input 
(the result is specified by the same way). Optional flags: '!' will overwrite
existing files (BE VERY CAREFULL!) and '.' will create output files in
our current directory (/tmp/x.fits to x.fits). 
.TP
.B coloring
.I [\-o file] [\-c colorspace] file1[,ext1] ...
.PP
Compose a color FITS frame by using of, at least, two single-color frames. 
Inputs are specified as twices: file,ext, where file is a name
of a FITS file, the ext is an arbitrary designation of corresponding
created FITS extension. The color-bands must be arranged
from short to longer wavelengths (as BVR are)!
The option -c specifies the color space of the images. 
The output color FITS is stored as color.fits or a file specified by -o option.
.TP
.B ctrafo 
.I [\-o file] [\-c colorspace] [\-ct cstable] file black1[,weight1] ...
.PP
.B ctrafo 
.I [\-\-list]
.PP
Transform a color FITS file (specified as the first non-optional parameter) 
to a new colorspace
given by \-c option. The \-\-list option lists all possible known
spaces. With -ct you can specify a file with addtional transformations.
The format of the file is described in sources. The mandatory parameter
is black (weight is optional) for every band in the input FITS. But, ones are
currently used only for the transformation to CIE 1931 XYZ colorspace. 
Both must be determined
empirically. It is recommended for black to use level 1-sigma under 
median for typical night sky images. The weight is proportional
to the recorded flux, so choose weight by the reciprocal relative ratio
of exposure times.
The output color FITS is stored as color.fits or 
in file specified by \-o option.
.TP
.B cone
.I [\-o file] [\-\-url URL] [\-r SR] RA DEC
.PP
.B cone
.I [\-\-list]
.PP
Search contents of a catalogue provided by Virtual observatory
interface (VO-capable cone search). Output is in VOTable format (XML).
The parameters RA, DEC and SR are in degrees. Available catalogues can 
be listed with \-\-list option. Any catalogue can by accessed by suppling
of \-\-url switch.
.TP
.B astrometry
.I [\-c] [\-t] ...
.PP
Astrometry calibration of images. The calibration can be optionally
saved to FITS header (-W). There are tree modes: fully automatic with 
star matching (default), just only fitting (--disable-match) and 
manualy providing values (--disable-fit). The values can be initiated 
via parameters: --proj, --xcen, --ycen, --acen, --dcen, --scale,
--angle. The match is affected by parameters: --nmatch, --maxmatch,
--uradius, --validity. Catalogue coordinates can be selected with
--key-alpha, --key-delta parameters. See homepage for detailed description.
.TP
.B photometry
.I [\-f] [\-t] ...
.PP
One detects stars and provides an aperture photometry.
.TP
.B listing
.PP
Not implemented yet.
.SH LOW-LEVEL ACTIONS
.B fits 
.I [\-k] [\-t] [\-i] [\-K key,key] [\-\-short] [file]
.PP
Fits action is intended for listing and editing values or informations 
included in FITS files.
.B votable
.I [\-t] [\-s]
.PP
Votable action converts VOTable data to another formates: fits,csv,txt,svg,xml.
.SH COMMON OPTIONS
.TP
.B 
.I \-b bitpix
Select bits per pixel of an output image. Possible values are: 8
(0-255),  16  (0-65535),  32  (0-4294967296)  and -32 (-10^38 ..
10^38), (values in braces indicates numerical range). An optimal
bitpix  for raw (instrumental) data is 16 (default) which covers
a full range of digital  cameras.  The  representation  occupies
width*height*2  bytes.  Some  out  of  range  (rare) values will
supressed (cut off). The representing by float numbers (eg. -32)
is  recommended value for images intended for further processing
because saves numerical precision and their numerical range (but
occupies of twice more space with respect to 16). 8 bits reduces
range (eg. suppress dynamical range) and  32  wastes  a  lot  of
storage place only. 
.TP
.B 
.I \-o filename
Specify an output file name. If the option is not used, the output 
is stored like the action name. Use dash '-' for  redirection  to
the  standard  output.  Precede  the  filename  with exclamation
point(!) to overwrite of existing FITS file.
.TP 
.I file(s)
The list of files to process. Usually as a names with wildcards (* or ?).
Use dash '-' to read from a standard input.
.SH GLOBAL OPTIONS
.TP
.B 
.I \-\-help
Print this help.
.TP
.B 
.I \-\-version
Print version and license.
.SH ENVIRONMENT VARIABLES
Environment variables are commonly used to redefine keywords in FITS headers.
FITS_KEY_FILTER - redefines FILTER keyword. Also available: FITS_KEY_EXPTIME, 
FITS_KEY_TEMPERAT, FITS_KEY_DATE-OBS.
.SH AUTHOR
Written by Filip Hroch.
.SH REPORTING BUGS
http://code.google.com/p/munipack/issues/list
.SH COPYRIGHT
Copyright © 2009-2011 Filip Hroch <hroch@physics.muni.cz>. 
License  GPLv3+:  GNU
GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This  is  free  software:  you  are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH SEE ALSO
xmunipack(1), http://munipack.physics.muni.cz/
